@echo off&setlocal enabledelayedexpansion
set sum=0
:loop
set /a num+=1
set /a sum=!num!+!sum!
if "%num%"=="100" goto end
goto loop
:end
echo %sum%